package com.lianxi.util;

import java.util.ResourceBundle;

/**
 * Created by wh on 2017/6/30.
 */
public class ResourcesUtil {

    private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("config");

    /**
     * 统一资源库 typeUniqueId
     */
    public static String resourceTypeUniqueId() {
        return BUNDLE.getString("resourceTypeUniqueId");
    }

    /**
     * 统一资源库 token
     */
    public static String resourceToken() {
        return BUNDLE.getString("resourceToken");
    }

    /**
     * 统一资源库接口
     */
    public static String resourceUrl() {
        return BUNDLE.getString("resourceUrl");
    }

    /**
     * 清理 import 项目的模版缓存接口
     */
    public static String clearTemplateUrl() {
        return BUNDLE.getString("clearTemplate");
    }

    public static String clearWapTemplateUrl() {
        return BUNDLE.getString("wapCleanTemplateCache");
    }

//      wap 生成路径

    public static String wapGenerateUrl() {
        return BUNDLE.getString("wapGenerate");
    }

    // mobile 导入地址

    public static String mobileUrl() {
        return BUNDLE.getString("mobileUrl");
    }


    public static String searchUrl() {
        return BUNDLE.getString("t1_search");
    }


    public static String addSearchUrl() {
        return BUNDLE.getString("t1_search_add");
    }

    public static String updateSearchUrl() {
        return BUNDLE.getString("t1_search_update");
    }

    public static String delSearchUrl() {
        return BUNDLE.getString("t1_search_del");
    }

    public static String getLockUser() {
        return BUNDLE.getString("lockUser");
    }

    public static String getSmsCode() {
        return BUNDLE.getString("smsCode");
    }

    public static String yzSmsCode() {
        return BUNDLE.getString("yzsms_code");
    }

    /**
     * 短信验证码有效时间
     */
    public static int getSmsAvailableTime() {
        return Integer.parseInt(BUNDLE.getString("sms_available_time"));
    }

    /**
     * 短信发送模式
     */
    public static String smsType() {
        return BUNDLE.getString("sms_type");
    }

    public static String getAdmin() {
        return BUNDLE.getString("admin");
    }

    public static String getDepViewFlag() {
        return BUNDLE.getString("dep_view_flag");
    }

    public static String redisip() {
        return BUNDLE.getString("redis.ip");
    }

    public static String redisport() {
        return BUNDLE.getString("redis.port");
    }

    public static String redispwd() {
        return BUNDLE.getString("redis.pwd");
    }

    /**
     * 静态文件的存放路径
     */
    public static String getPath() {
        return BUNDLE.getString("path");
    }

    public static String ikNum() {
        return BUNDLE.getString("ik.num");
    }

    public static String ikQuantity() {
        return BUNDLE.getString("ik.quantity");
    }

    /**
     * 登录公户名
     */
    public static String getLoginUser() {
        return BUNDLE.getString("loginUser");
    }


    public static String getRocketSrvAddr() {
        return BUNDLE.getString("rocketMQ_addr");
    }

    public static String getRocketMsgBodyOverHowMuch() {
        return BUNDLE.getString("rocketMQ_msg_body_over");
    }

    public static String getRocketTimeout() {
        return BUNDLE.getString("rocketMQ_timeout");
    }

    public static String getRocketMQTopicQueueNums() {
        return BUNDLE.getString("rocketMQ_default_topic_queue_nums");
    }

    public static String getRocketMQMessageMaxSize() {
        return BUNDLE.getString("rocketMQ_message_max_size");
    }


    public static String getZimgHost() {
        return BUNDLE.getString("zimg_host");
    }

//    /**
//     * 工单域名
//     */
//    public static String workOrderHost() {
//        return BUNDLE.getString("work_order_host");
//    }

    public static String getFTPConfig() {
        return BUNDLE.getString("ftp_config");
    }

    public static String getFTPHost() {
        return BUNDLE.getString("ftp_host");
    }

    /**
     * 单篇抓取
     */
    public static String crawlappId() {
        return BUNDLE.getString("appid");
    }

    /**
     * 获取关键词地址
     *
     * @return
     */
    public static String wordUrl() {
        return BUNDLE.getString("word_url");
    }

    public static String crawlappkey() {
        return BUNDLE.getString("appkey");
    }

    /**
     * 单篇抓取地址
     */
    public static String crawlurl() {
        return BUNDLE.getString("url");
    }

    /**
     * 资源类型
     *
     * @return
     */
    public static String getMaterialType() {
        return BUNDLE.getString("material_type");
    }

    public static String getLimitWidth() {
        return BUNDLE.getString("limit_width");
    }

    public static String getMaterialCache() {
        return BUNDLE.getString("material_cache");
    }



    public static String getEnv() {
        return BUNDLE.getString("env");
    }


//    public static String getJRobotUrl() {
//        return BUNDLE.getString("jrobot_url");
//    }

    public static String getCdnUrl() {
        return BUNDLE.getString("cdn_url");
    }

    /**
     * 省政府id
     */
    public static String getSiteId() {
        return BUNDLE.getString("site_id");
    }

    /**
     * 素材库类型 图片根目录id
     */
    public static String getMaterialImg() {
        return BUNDLE.getString("material_img");
    }

    /**
     * 素材库类型 文件根目录id
     */
    public static String getMaterialFile() {
        return BUNDLE.getString("material_file");
    }

    /**
     * 生成api
     */
    public static String getGenerateUrl() {
        return BUNDLE.getString("generate_url");
    }

    /**
     * 退回上报系统api
     */
    public static String getT1ReportBack() {
        return BUNDLE.getString("t1_report_back");
    }


    /**
     * lingcai appKey
     *
     * @return
     */
    public static String getLingCaiAppKey() {
        return BUNDLE.getString("lingcai_app_key");
    }

    /**
     * lingcai appSecret
     *
     * @return
     */

    public static String getLingCaiAppSecret() {
        return BUNDLE.getString("lingcai_app_secret");
    }

    public static String getHeiMaCheck() {
        return BUNDLE.getString("heima_check");
    }




    /**
     * zip上传本地服务器路径
     *
     * @return
     */
    public static String getZipUploadPath() {
        return BUNDLE.getString("zip_upload_path");
    }


    //======================================================阿里云上传配置=======================================================================
    //支持上传的文件类型
    public static String fileType() {
        return BUNDLE.getString("upload_file_type");
    }

    public static String imgType() {
        return BUNDLE.getString("upload_img_type");
    }

    public static String videoType() {
        return BUNDLE.getString("upload_video");
    }

    public static String mediaType() {
        return BUNDLE.getString("upload_media");
    }


    //======================================================Redis集群=======================================================================
    /**
     * redis cluster
     */

    public static String redisClusterNodes() {
        return BUNDLE.getString("redis.cluster.nodes");
    }

    public static String redisClusterPassword() {
        return BUNDLE.getString("redis.cluster.password");
    }

    /**
     * ============================================OSS============================================
     * 阿里云对象存储 accessKeyId
     */
    public static String ossAccessKeyId() {
        return BUNDLE.getString("access_key_id");
    }

    /**
     * 阿里云对象存储 accessKeySecret
     */
    public static String ossAccessKeySecret() {
        return BUNDLE.getString("access_key_secret");
    }

    /**
     * 阿里云对象存储 endPoint
     */
    public static String ossEndPoint() {
        return BUNDLE.getString("end_point");
    }
    /**
     * 阿里云对象存储 bucketName
     */
    public static String ossBucketName() {
        return BUNDLE.getString("bucket_name");
    }

    public static String ossDomain() {
        return BUNDLE.getString("domain");
    }


    /**
     * 阿里云对象存储 映射地址 访问图片使用
     */
    public static String ossCastDomain() {
        return BUNDLE.getString("cast_domain");
    }


    public static String ossCallbackUrl() {
        return BUNDLE.getString("callback_url");
    }

    public static String getUploadFileType() {
        return BUNDLE.getString("upload_file_type");
    }

    public static String getUploadImgType() {
        return BUNDLE.getString("upload_img_type");
    }

    public static String getUploadVideoType() {
        return BUNDLE.getString("upload_video");
    }

    public static String getUploadMediaType() {
        return BUNDLE.getString("upload_media_type");
    }

    public static String getUploadFileMaxSize() {
        return BUNDLE.getString("upload_file_max_size");
    }

    public static String getUploadImgMaxSize() {
        return BUNDLE.getString("upload_img_max_size");
    }

}